const a = 0;
switch (foo) {
// The following case clauses are wrapped into blocks using brackets
  case 1: {
    let x = 1;
    break;
  }
  case 2: {
    const y = 2;
    break;
  }
  case 3: {
    function f() {}
    break;
  }
  case 4:
    // Declarations using var without brackets are valid due to function-scope hoisting
    var z = 4;
    break;
  default: {
    class C {}
  }
}

switch (a) { case 1: { let x = 1; break; } default: { let x = 2; break; } }

switch (a) { case 1: { const x = 1; break; } default: { const x = 2; break; } }

switch (a) { case 1: { function f() {} break; } default: { function f() {} break; } }

switch (a) { case 1: { class C {} break; } default: { class C {} break; } }

switch (a) {
  case 1:
  case 2: {}
}

switch (a) {
  case 1: var x;
}